package com.qen.truelicense.license;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * This is a convenience class implementing the {@link KeyStoreParam} interface.
 *
 * @author Christian Schlichtherle
 * @version 1.0.0
 */
@Getter
@Setter
public class DefaultKeyStoreParam extends AbstractKeyStoreParam {

    private final String alias;
    private final String storePwd;
    private final String keyPwd;

    /**
     * Constructs a new instance.
     *
     * @param clazz    Used to retrieve the classloader required to load the keystore as a resource.
     * @param resource The resource identifier for the keystore to be returned by {@link #getStream()}.
     * @param alias    The alias for the key entry in the key store to be returned by {@link #getAlias()}.
     * @param storePwd The key store password to be returned by {@link #getStorePwd()}.
     * @param keyPwd   The password for the private key in the key store entry to be returned by {@link #getStorePwd()}.
     */
    public DefaultKeyStoreParam(final Class clazz, final String resource, final String alias, final String storePwd, final String keyPwd) {
        super(clazz, resource);
        this.alias = alias;
        this.storePwd = storePwd;
        this.keyPwd = keyPwd;
    }

}
